1. Field of the Invention
Methods and apparatuses consistent with the present invention relate to relaying messages to communication devices, and more particularly, to allowing Universal Plug and Play (UPnP) devices to exchange their exact status information with one other in a network.
2. Description of the Related Art
Universal Plug and Play (UPnP) is a technique of establishing communications among devices connected to a network, whereby services of a device can be automatically detected by another device. If a user just connects a device to a network, UPnP allows the connected device to be automatically detected and controlled by the existing devices in the network, thereby reducing efforts needed to install or set a device in the network. Therefore, UPnP has frequently been used as a technique of constructing a home network for home automation, and research has been continuously conducted into UPnP.
FIGS. 1A through 1D are diagrams illustrating a related art method in which information is exchanged between UPnP devices to recognize the presence of a UPnP device in a network.
A UPnP communication protocol, which is used to establish communications between devices in a home network, is a standard whereby a message in a Simple Object Access Protocol (SOAP) format is interpreted to interpret the attributes of and control information for a device, based on an Internet Protocol (IP) packet. Discovery and description operations are performed to detect a device in a network by using the UPnP communication protocol. Referring to FIG. 1A, in order to perform the discovery and description operations, messages, such as an M-SEARCH message, a RESPONSE message regarding the M-SEARCH message, and a NOTIFY message, are exchanged between a UPnP device that provides services and a control point that is a client requesting the services. Through the three messages, UPnP devices in a network are perceived by the control point. Details of the three messages are disclosed in UPnP standards.
FIG. 2 is a diagram of a protocol stack used to make a mobile communication device that supports Bluetooth operate as a UPnP device.
A Bluetooth device allows a power mode to be changed at an application layer through a Host Controller Interface (HCI). That is, when a UPnP device or a control point operates in a power save mode, the power mode can be changed through the HCI. A Media Access Control (MAC) Bridging 802.11 d layer provides a function of connecting different network interfaces to each other. For instance, a packet received via a Bluetooth network interface is transmitted to an Ethernet network interface via the MAC Bridging 802.11d layer. Bluetooth core stack and Personal Area Network (PAN) profile support a process of transforming a received Bluetooth packet into an IP packet, and a PS module manages the power mode of a device. A UPnP stack and the application layer act as a network middleware, i.e., they perceive and control devices connected to a network and inform the other devices of the functions of the connected devices. The UPnP stack includes internal modules that set the IP of a device, transmit the information regarding the device via the network, and report a status change of the device.
When constructing a home network using a UPnP protocol, a device relaying messages to two devices is needed to operate a device connected to a wired network together with a device connected to a wireless network. For example, a home network system in which a wired network device operates as a control point and a Bluetooth device operates as a UPnP controlled device that provides services, may be constructed as illustrated in FIG. 3.
A Bluetooth system uses a piconet as a basis network unit. In the Bluetooth system, the network is managed by a master, and slaves exchange data with one another through the master. Since it takes several seconds to establish a data link between two Bluetooth devices, it is recommended that a set data link be not lost. If a Bluetooth device remains connected to the network even when there is no data transmission, unnecessary power consumption results. As a solution to this problem, the Bluetooth device supports three power save modes.
FIGS. 4A through 4C illustrate an exchange of data between a master and a slave when a Bluetooth device enters a power save mode. In detail, FIG. 4A is a diagram illustrating an exchange of data between a slave and a master in a hold mode. The hold mode indicates a type of the power save mode in an deactivation period that is not periodic but is predictable. In the hold duration, an Asynchronous Connection-Less (ACL) packet is not exchanged between the two devices, and the deactivation mode is changed to an activation mode when the hold duration ends.
FIG. 4B is a diagram illustrating a sniff mode that is an action mode in which exchange of packets is allowed in a specific slot of a cycle. In the sniff mode, transmission characteristics are determined by exchanging information regarding a sniff offset that is a point of time when packets are exchanged, a sniff duration defined by information regarding a first packet and a last packet, and a sniff period that is a duty cycle of the sniff mode between a master and a slave.
FIG. 4C is a diagram illustrating a park mode that minimizes power consumption of a slave. Each of a master and a slave can transmit a message requesting a change from an action mode to the hold mode to the opposite side. When the slave operates in the hold mode, the slave returns an address AM ADDR of a Bluetooth device that is in an activation state to the master.
Specific packets are exchanged at predetermined intervals of time in order that each UPnP device in a home network can recognize the presence of the other UPnP devices in the home network and receive and maintain information from the other UPnP devices. However, as described above, when a Bluetooth device operates in the power save mode to reduce power consumption, packets that must be periodically delivered are unable to be delivered, thereby preventing accurate information regarding devices in the home network from being obtained. Also, when a UPnP control command is delivered to a device in the power save mode, a response to this command will not probably be received from the device, thereby causing an error.
Also, in an addressing operation of a UPnP device, IP collision may occur when a DHCP server is not supported and each device is allocated an IP address through an automatic IP mechanism. A new device connected to the home network generates an IP address through the automatic IP mechanism and broadcasts a message for checking whether a device is allocated the generated IP address. If a device allocated the generated IP address enters the power save mode, it cannot receive the message from the new device and transmit a response message to the new device. In this case, the new device registers and uses the generated IP address. If the device in the power save mode enters the activation mode, the same IP address may be used by both the device and the new device.